package com.dats.pool;

import com.dats.util.LogUtil;
import org.logicalcobwebs.proxool.configuration.JAXPConfigurator;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author sig
 * @since 2016/9/18
 */
public class DatSPool {
    public static Map<Class<?>, Map<Integer, ?>> baseMap = new HashMap<>();
    public static Map<Class<?>, Map<Integer, List<?>>> baseListMap = new HashMap<>();
    public static Map<Class<?>, Map<Integer, List<?>>> baseListMap2 = new HashMap<>();
    public static Map<Class<?>, String> baseInitMap = new HashMap<>();
    public static Map<Class<?>, String> baseInitMap2 = new HashMap<>();

    public static String baseAlias = "proxool.base";
    public static String userAlias = "proxool.user";

    public static void init() {
        try {
            JAXPConfigurator.configure("config/proxool.xml", false);
        } catch (Exception e) {
            LogUtil.console.error("Configure proxool failed.");
        }
    }
}
